|
| Run file for !HelpScan
|

| Standard stuff. CarryOn is used later as a way of stopping HelpScan from here,
| without having to resort to a nasty, non-multitasking Error command
Set HelpScan$Dir <Obey$Dir>
Set HelpScan$CarryOn "True"
IconSprites <HelpScan$Dir>.!Sprites


| Internationalisation stuff
Run <HelpScan$Dir>.Resources.ResFind HelpScan


| Set up those exciting variables that it's all about
Set HelpScan$Meta HelpScanRes:!Meta


| Sets up so links in HTML do groovy things
Set Alias$URLOpen_HelpScanAction Run HelpScanRes:HTMLAction %%*0


| We need RISC OS 3.5 at least
RMEnsure UtilityModule 3.5 Run HelpScanRes:MultiError -t HelpScanRes:Templates -m HelpScanRes:Messages -k error_minimumos
RMEnsure UtilityModule 3.5 UnSet HelpScan$CarryOn


| The ability to display HTML is pretty essential...
If "<Alias$@RunType_FAF>" = "" Then Run HelpScanRes:MultiError -t HelpScanRes:Templates -m HelpScanRes:Messages -k error_needhtml
If "<Alias$@RunType_FAF>" = "" Then UnSet HelpScan$CarryOn


| Check if AcornURI is present, try to load it, if it's still not there set a variable to use in !RunImage
Set HelpScan$AcornURITest "Present"
RMEnsure AcornURI 0.12 IfThere System:Modules.Network.URI Then Filer_Run System:Modules.Network.URI
RMEnsure AcornURI 0.12 UnSet HelpScan$AcornURITest


| Check the presence or otherwise of SysLog. Set a system variable accordingly for use in !RunImage
Set HelpScan$SysLogTest "Present"
If "<SysLog$Dir>" = "" Then Unset HelpScan$SysLogTest
If "<HelpScan$SysLogTest>" = "Present" Then RMEnsure SysLog 0.01 Run <SysLog$Dir>.!Run
RMEnsure SysLog 0.01 Unset HelpScan$SysLogTest


| Finally set wimpslot and off we go (so long as no problems were encountered earlier)
WimpSlot -min 400K -max 400K
If "<HelpScan$CarryOn>" = "True" Then Run <HelpScan$Dir>.!RunImage


| It's all over... Time to tidy up our system variables
UnSet HelpScan$SysLogTest
UnSet HelpScan$AcornURITest
UnSet HelpScan$CarryOn